function getUrlVars() {
    var vars = {};
    var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) {
        vars[key] = value;
    });
    return vars;
}


function startDownload(){
	var release = getUrlVars()["release"];
	var version = getUrlVars()["version"];
	var arch = getUrlVars()["arch"];
	var so = getUrlVars()["so"];
	var extension;
	if(so=="windows"){
		extension=".exe";
	}else{
		extension=".zip";
	}
	var downloadfile= "../public_html/sakefile/SAKE_v"+release+"_"+version+"_"+arch+"_"+so+extension;
	
	window.location.href = downloadfile;
}

setTimeout(startDownload,2000)
